﻿using System;
using System.ServiceModel.Description;

using advadev.DataStorage;


namespace advadev.DataStorage.Demo.Web
{

    /// <summary>
    /// Represents a Data Storage Web-Service that stores the items in the
    /// memory
    /// </summary>
    public class MemoryDataStorageService : DataStorageService
    {

        /// <summary>for internal use</summary>
        static private GenericEntityMemoryDataStorage genericEntityMemoryDataStorage = new GenericEntityMemoryDataStorage();


        /// <summary>
        /// Initializes a new instance of the MemoryDataStorageService class
        /// </summary>
        public MemoryDataStorageService()
            : base(genericEntityMemoryDataStorage)
        {
        }


        /// <summary>
        /// Gets the service administrator credentials
        /// </summary>
        override protected ClientCredentials ServiceAdministratorCredentials
        {
            get
            {
                ClientCredentials serviceAdministratorCredentials = new ClientCredentials();
                serviceAdministratorCredentials.UserName.UserName = "adminUsername";
                serviceAdministratorCredentials.UserName.Password = "adminPassword";
                return serviceAdministratorCredentials;
            }
        }

    }

}
